<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateScenicBuyTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('scenic_buy', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('scenic')->unsigned()->nullable()->index('scenic')->comment('景点id、当查询用户是否拥有该景点讲解试听权也可以通过此表');
			$table->integer('member_id')->unsigned()->nullable()->index('member_id');
			$table->integer('spot')->default(1)->comment('价格默认为1，为了防止有免费赠送类型的');
			$table->string('desc')->nullable()->comment('描述说明：如xx景点讲解消费||新用户注册景点赠送');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('scenic_buy');
	}

}
